#include<cstdio>
#include<cstring>
const char* prompt[] = {  " -- is not a palindrome.",
                          " -- is a mirrored string.",
                          " -- is a regular palindrome.", 
                          " -- is a mirrored palindrome."};
char mir(char ch) {
  char m;
  switch(ch) {
      case 'A':ch='A';break;
      case 'E':ch='3';break;
      case 'H':ch='H';break;
      case 'I':ch='I';break;
      case 'J':ch='L';break;
      case 'L':ch='J';break;
      case 'M':ch='M';break;
      case 'O':ch='O';break;
      case 'S':ch='2';break;
      case 'T':ch='T';break;
      case 'U':ch='U';break;
      case 'V':ch='V';break;
      case 'W':ch='W';break;
      case 'X':ch='X';break;
      case 'Y':ch='Y';break;
      case 'Z':ch='5';break;
      case '1':ch='1';break;
      case '2':ch='S';break;
      case '3':ch='E';break;
      case '5':ch='Z';break;
      case '8':ch='8';break;
      default: m=ch;
  }
  if(m==ch) return '\0';  // To indicate that is don't have a mirror.
  else return ch;
}
char buf[10000];
int main() {  
  bool first = true;
  while(scanf("%s", buf)==1) {
    bool palindrome=true, mirror=true;
    int size = strlen(buf);
    int times = size/2 + 1;
    for(int i=0; i<times && palindrome; ++i)
      if(buf[i]!=buf[size-i-1]) 
        palindrome=false;
    for(int i=0; i<times && mirror; ++i)
      if(mir(buf[i])!=buf[size-i-1])
        mirror=false;
    if(!first) printf("\n");
    else first = false;
    printf("%s%s\n", buf,(prompt[palindrome*2+mirror]));
  }
  printf("\n"); // Why should I append a <CR> to get an AC?
                // Thanks to the udebug.com, by the way.
  return 0;
}
